The 304 Not Modified
HTTP status code indicates that the resource requested by the client has not been modified since the last time the client accessed it. The server is essentially telling the client to use its cached version of the resource.
Here's a breakdown:
Purpose: To reduce network bandwidth usage and server load by avoiding unnecessary data transfers.
How it works: The client includes an If-Modified-Since
or If-None-Match
header in its request.
If-Modified-Since
: Contains the date and time the client last received the resource.If-None-Match
: Contains an ETag
(entity tag), which is a unique identifier for the resource version.
If the resource on the server hasn't been modified since the date in If-Modified-Since
or the ETag
still matches, the server responds with a 304 Not Modified
status.Response: The server's response body is empty (or minimally informative). The response headers may include headers regarding the cache, such as Cache-Control
, Expires
, ETag
, or Vary
.
Client Action: The client uses its cached copy of the resource.
Use cases:
In summary, a 304
response signals successful conditional retrieval of a resource from the cache. Check out more about <a href="https://www.wikiwhat.page/kavramlar/HTTP%20Status%20Codes">HTTP Status Codes</a> and <a href="https://www.wikiwhat.page/kavramlar/Browser%20Caching">Browser Caching</a> for a more detailed explanation.
Ne Demek sitesindeki bilgiler kullanıcılar vasıtasıyla veya otomatik oluşturulmuştur. Buradaki bilgilerin doğru olduğu garanti edilmez. Düzeltilmesi gereken bilgi olduğunu düşünüyorsanız bizimle iletişime geçiniz. Her türlü görüş, destek ve önerileriniz için iletisim@nedemek.page